<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">
    <ui:composition template="/publico/template.xhtml">
        <ui:define name="content">
            <h:form id="fprincipal">
                <p:messages/>

                <p:panel id="pprincipal"
                         header="Equipamento">
                    <h:inputHidden id="ihequipamento"
                                   value="#{equipamentoBean.equipamento.id}" />

                    <h:panelGrid id="pgprincipal" columns="2">  
                        <h:outputLabel id="olequipamento"
                                       for="itequipamento" 
                                       value="Nome *: "/>
                        <p:inputText id="itequipamento" 
                                     value="#{equipamentoBean.equipamento.nome}" 
                                     required="true"/>
                        <h:outputLabel id="oldescricao"
                                       for="itdescricao" 
                                       value="Descrição: "/>
                        <p:inputTextarea id="itdescricao" 
                                         value="#{equipamentoBean.equipamento.descricao}"/>
                    </h:panelGrid>

                    <p>
                        <p:commandButton id="cbSalvar"
                                         ajax="false" 
                                         value="Salvar" 
                                         action="#{equipamentoBean.salvar}"/>

                        <p:button id="cbcancelar"
                                  outcome="/admin/equipamento/lista-equipamento.xhtml"
                                  value="Cancelar"/>
                    </p>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
